package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 异常日志对象 system_log
 * 
 * @author ruoyi
 * @date 2025-02-20
 */
public class SystemLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 异常发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "异常发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date timestamp;

    /** 异常级别 */
    @Excel(name = "异常级别")
    private String level;

    /** 异常类型代码 */
    @Excel(name = "异常类型代码")
    private String errorCode;

    /** 异常摘要 */
    @Excel(name = "异常摘要")
    private String message;

    /** 所属环境 */
    @Excel(name = "所属环境")
    private String environment;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTimestamp(Date timestamp) 
    {
        this.timestamp = timestamp;
    }

    public Date getTimestamp() 
    {
        return timestamp;
    }
    public void setLevel(String level) 
    {
        this.level = level;
    }

    public String getLevel() 
    {
        return level;
    }
    public void setErrorCode(String errorCode) 
    {
        this.errorCode = errorCode;
    }

    public String getErrorCode() 
    {
        return errorCode;
    }
    public void setMessage(String message) 
    {
        this.message = message;
    }

    public String getMessage() 
    {
        return message;
    }
    public void setEnvironment(String environment) 
    {
        this.environment = environment;
    }

    public String getEnvironment() 
    {
        return environment;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("timestamp", getTimestamp())
            .append("level", getLevel())
            .append("errorCode", getErrorCode())
            .append("message", getMessage())
            .append("environment", getEnvironment())
            .append("createTime", getCreateTime())
            .toString();
    }
}
